package com.hengpeng.itfinbase.persist;

import javax.persistence.Column;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;

import com.hengpeng.common.persist.entity.AbstractEntity;

/**
 * <pre>
 * 快捷登录功能
 * </pre>
 * @author CHARLES
 * @version 1.0, 2011-6-24
 */
public class MemberShare extends AbstractEntity
{
	/**
	 * <pre>
	 * 用户类型
	 * </pre>
	 * @author CHARLES
	 * @version 1.0, 2011-6-24
	 */
	public static enum UserType
	{
		ALIPAY("支付宝", "A"), BAIDU("百度", "B"), HAPPY("开心彩票", "S"), JBH("交博汇", "JBH"), JYZG("建易中国", "JY"), MALL1("一号商城",
				"1M"), SHFFT("上海付费通", "F"), SINA("新浪微博帐号", "SI"), SZHOME("深圳房网", "H"), SZNEWS("深圳新闻网", "N"), TENCENT(
				"腾讯QQ", "T"), ZXYDPAY("中信异度支付", "Z"), WEIXIN("微信", "WX");

		private String prefix;

		private String text;

		UserType(String text, String prefix)
		{
			this.text = text;
			this.prefix = prefix;
		}

		public String getPrefix()
		{
			return prefix;
		}

		public String getText()
		{
			return text;
		}

		public void setPrefix(String prefix)
		{
			this.prefix = prefix;
		}
	}

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "memberShare")
	@SequenceGenerator(name = "memberShare", sequenceName = "seq_memberShare", allocationSize = SEQALLOCATIONSIZE, initialValue = SEQINITNUM)
	private Long id;

	/**
	 * 用户昵称
	 */
	private String realName;

	/**
	 * 用户ID
	 */
	private String userId;

	/**
	 * 用户类型
	 */
	@Enumerated(javax.persistence.EnumType.STRING)
	@Column(length = 20)
	private UserType userType;

	public Long getId()
	{
		return id;
	}

	public String getRealName()
	{
		return realName;
	}

	public String getUserId()
	{
		return userId;
	}

	public UserType getUserType()
	{
		return userType;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public void setRealName(String realName)
	{
		this.realName = realName;
	}

	public void setUserId(String userId)
	{
		this.userId = userId;
	}

	public void setUserType(UserType userType)
	{
		this.userType = userType;
	}

}
